@extends('wap.layouts.master')
@section('title','会员积分')

@section('content')

<div class="aw-main aw-user aw-user-integral">
	<div class="aw-bg-1 aw-assest-user-top-img">
		<div class="aw-user-top-bg"></div>
		<div class="aw-user-top-poa aw-integral-title">
			<div class="aw-integral-title-icon"><i class="aw-icon aw-icon-user-san aw-icon-integral"></i>会员积分</div>
			<div class="aw-integral-title-num">@{{info_integral}}</div>
		</div>
	</div>
	<div class="aw-user-integral-h3 aw-mt10">积分记录</div>
	<ul class="aw-assest-form aw-bg-fff">
		<li class="aw-form-li" v-for="(list,key) in list_integral">
			<div class="aw-li-title">@{{list.desc}}</div>
			<div class="aw-li-time">@{{list.dateline}}</div>
			<div class="aw-li-right aw-color-1">+@{{list.integral}}</div>
		</li>
	</ul>
	<vue-loding :info_page="info_page"></vue-loding>
</div>

@section('pagejs')
@parent

<script type="text/javascript" src="/wap/js/vue-loding.js"></script>
<script type="text/javascript">
var Vue_Data={
	list_integral:{},//获取积分列表
	info_integral:'',//获取积分
	info_page:{count:0,page:1,tips:'积分'},
	form:{},
}
var AD_list={
	api:'/api/user/integral-list',
	form_data:{},
	tips:false,
}
function Get_Refresh_Integral_List(push){
	getData(AD_list,function(ajax_data){
		if(push==1){
			for(var i=0;i<ajax_data.list.length;i++){
				vm.list_integral.push(ajax_data.list[i])
			}
			vm.info_integral=ajax_data.integral;
			var info_page={count:ajax_data.count,page:ajax_data.page};
			$.extend(vm.info_page,info_page);
			return;
		}
		Vue_Data.list_integral=ajax_data.list;
		Vue_Data.info_integral=ajax_data.integral;
		var info_page={count:ajax_data.count,page:ajax_data.page};
		$.extend(Vue_Data.info_page,info_page);
		is_watch='';
	})
}
Get_Refresh_Integral_List()
vm=new Vue({
	el:'#Vue-body',
	data:Vue_Data,
	components:{
		'vue-loding':V_Assest_loding,
	},methods:{
		Get_List_Data:function(push){
			//更新数据
			$.extend(AD_list.form_data,this.form);
			Get_Refresh_Integral_List(push)
		}
	}
})
</script>
@endsection

@endsection

